package Snake;


public class Food extends Cell implements Comparable<Food> {

//	private LinkedList<Food> listFood = new LinkedList<Food>();

	public Food(int x, int y) {
		super(x, y);
	}
	
	
	public synchronized boolean isValidToMove(){
		return true;
	}
	
	public boolean isFood(){
		return true;
	}

	public int compareTo(Food food) {
		if (this.getX() < food.getX()) {
			return -1;
		} else if (this.getX() > food.getX()) {
			return 1;
		}
		return Integer.compare(this.getY(), food.getY());
	}

	@Override
	public String toString() {
		return "Food [x=" + getX() + ", y=" + getY() + "]";
	}

}